<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="csrf-token" content="{{ csrf_token() }}">
    <title>MySQL管理</title>
    <link rel="stylesheet" href="/lay/layui/css/layui.css">
    <script src="/js/jquery.min.js"></script>
    <script type="text/javascript" src="/lay/layer/layer.js"></script>
    <script src="/lay/layui/layui.js"></script>
    <script type="text/javascript" src="/js/common.js"></script>
    <script type="text/javascript" src="/js/htmlEncode.js"></script>
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <div class="layui-logo"><span onclick="jsvascript:location.href='/index/index'">Mysql管理</span></div>
        <!-- 头部区域（可配合layui已有的水平导航） -->
        <ul class="layui-nav layui-layout-left">
            <li class="layui-nav-item"><a href="javascript:;" onclick="openConsoleLayer()">控制台</a></li>
            <li class="layui-nav-item"><a href="javascript:;">MySQL版本：{{session('db')['db_version']}}</a></li>
            {{--<li class="layui-nav-item"><a href="">用户</a></li>--}}
            {{--<li class="layui-nav-item">--}}
                {{--<a href="javascript:;">其它系统</a>--}}
                {{--<dl class="layui-nav-child">--}}
                    {{--<dd><a href="">邮件管理</a></dd>--}}
                    {{--<dd><a href="">消息管理</a></dd>--}}
                    {{--<dd><a href="">授权管理</a></dd>--}}
                {{--</dl>--}}
            {{--</li>--}}
        </ul>
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item">
                <a href="javascript:;">
                    <img src="https://wx.qlogo.cn/mmopen/vi_32/mto2aoyAxibBNqkmR6oySQKHRT8l3mnabAkdJBzuVTGUuvlVKjMpjdWfiaricJxqKA7TjLEQQSw2ysNl8fVLRKriaA/132" class="layui-nav-img">
                    {{session('db')['host']}}
                </a>
                <dl class="layui-nav-child">
                    <dd><a href="#">基本资料</a></dd>
                    <dd><a href="#">安全设置</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item"><a href="/config/disconnect">退了</a></li>
        </ul>
    </div>

    @if(isset($db_list))
    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul class="layui-nav layui-nav-tree"  lay-filter="test">
                <li class="layui-nav-item"><a class="create-db" href="javascript:;">新建数据库</a></li>
                <li class="layui-nav-item layui-nav-itemed">
                    <a class="" href="javascript:;">数据库</a>
                    <dl class="layui-nav-child">
                        @foreach($db_list as $v)
                            <dd><a href="/index/index?db_name={{$v['Database']}}">{{$v['Database']}}</a></dd>
                        @endforeach
                    </dl>
                </li>
            </ul>
        </div>
    </div>
    @else
        <div class="layui-side layui-bg-black">
            <div class="layui-side-scroll">
                <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
                <ul class="layui-nav layui-nav-tree"  lay-filter="test">
                    <li class="layui-nav-item"><a class="create-table" href="/index/createTable?db_name={{$db_name}}">新建数据表</a></li>
                    <li class="layui-nav-item layui-nav-itemed">
                        <a class="" href="javascript:;">{{$db_name}}的表</a>
                        <dl class="layui-nav-child">
                            @foreach($table_list as $v)
                                <dd><a href="/index/record?db_name={{$db_name}}&table_name={{$v[0]}}" title="{{$v[0]}}">{{$v[0]}}</a></dd>
                            @endforeach
                        </dl>
                    </li>
                </ul>
            </div>
        </div>
    @endif

    <div class="layui-body">
        <!-- 内容主体区域 -->
        @yield('content')
    </div>

    <div class="layui-footer">
        <!-- 底部固定区域 -->
        © mysql.lushaoming.site - 版权所有
    </div>
</div>

<script>
    //JavaScript代码区域
    layui.use('element', function(){
        var element = layui.element;

    });
</script>
</body>
</html>
